package com.kunminx.examplegreendao;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;

/**
 * @ClassName User
 * @Description TODO
 * @Author ${孙伟豪}
 * @Date 2020/12/17 17:49
 * @Version 1.0
 */
@Entity
public class BeanTouch implements Parcelable {
    @Id
    private Long id;
    @Property
    private String name;
    @Property
    private int size;
    @Property
    private String listTouch;
    @Generated(hash = 53676501)
    public BeanTouch(Long id, String name, int size, String listTouch) {
        this.id = id;
        this.name = name;
        this.size = size;
        this.listTouch = listTouch;
    }
    @Generated(hash = 1046643494)
    public BeanTouch() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getSize() {
        return this.size;
    }
    public void setSize(int size) {
        this.size = size;
    }
    public String getListTouch() {
        return this.listTouch;
    }
    public void setListTouch(String listTouch) {
        this.listTouch = listTouch;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.name);
        dest.writeInt(this.size);
        dest.writeString(this.listTouch);
    }

    protected BeanTouch(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.name = in.readString();
        this.size = in.readInt();
        this.listTouch = in.readString();
    }

    public static final Parcelable.Creator<BeanTouch> CREATOR = new Parcelable.Creator<BeanTouch>() {
        @Override
        public BeanTouch createFromParcel(Parcel source) {
            return new BeanTouch(source);
        }

        @Override
        public BeanTouch[] newArray(int size) {
            return new BeanTouch[size];
        }
    };
}
